import sqlite3 as sql
import os    
import re

home = os.path.expanduser('~')
dbconnection = sql.connect(home+"\\testdb")
cu = dbconnection.cursor()
while 1==1:
    inp = raw_input()
    if(inp[0:3]=='quit'):
        cu.commit()
        cu.close()
        dbconnection.close()
        break
    vals = re.split(',',inp)
    cu.execute('''insert into %s values('%s','%s','%s')''' %(vals[0],vals[1],vals[2],vals[3]))
    